package com.example.analysis.controller;

import com.example.analysis.entity.Class;
import com.example.analysis.entity.Course;
import com.example.analysis.service.ClassService;
import com.example.analysis.service.CourseService;
import com.example.analysis.utils.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/class")
@CrossOrigin
public class ClassController {
    @Autowired
    private ClassService classService;

    /**
     * 查询所有班级
     * @return 班级集合/失败信息
     */
    @GetMapping("/get_all")
    public Response<List<Class>> getAll() {
        return classService.getAll();
    }
}
